﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace NoteHelper.Model
{
    public class ArticleNote
    {
        public ArticleNote()
        {
            CreateTime = DateTime.Now;
            LastUpdateTime = DateTime.Now;
            FileName = "";
            FormatFilePath = "";
        }

        [MinInt(0)]
        [DisplayName("笔记ID")]
        public int ObjectID { get; set; }

        [DisplayName("文章ID")]
        public int ArticleID { get; set; }

        [DisplayName("创建时间")]
        public DateTime CreateTime { get; set; }

        [DisplayName("最后修改时间")]
        public DateTime LastUpdateTime { get; set; }

        [DisplayName("笔记内容")]
        [StringLength(2000)]
        public string Description { get; set; }

        [DisplayName("文章")]
        public virtual Article Article { get; set; }

        [DisplayName("文件名")]
        public string FileName { get; set; }

        [DisplayName("实际存放路径")]
        public string FormatFilePath { get; set; }
    }
}
